package com.common.service.impl;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class PublishService {
    @Autowired
    private AmqpTemplate amqpTemplate;
    public void send(String exchange, String routingKey, Object message) {
        amqpTemplate.convertAndSend(exchange, routingKey, message);
    }

    public void sendTwo(String routingKey, Object message) {
        amqpTemplate.convertAndSend(routingKey, message);
    }
}
